package cn.stylefeng.guns.modular.business.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 用户属性表
 * </p>
 *
 * @author jwj
 * @since 2019-07-19
 */
@TableName("c_user_property")
@Data
public class UserProperty implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "user_id")
    private Long userId;

    /**
     * 父级id
     */
    @TableField("parent_id")
    private Long parentId;

    /**
     * 父级等级id
     */
    @TableField("parent_grade_id")
    private Integer parentGradeId;

    /**
     * 推荐关系
     */
    @TableField("relation_path")
    private String relationPath;

    /**
     * 等级id
     */
    @TableField("grade_id")
    private Integer gradeId;

    /**
     * 等级级别
     */
    @TableField("grade_level")
    private Integer gradeLevel;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField("delete_flag")
    private Integer deleteFlag;

    /**
     * 推荐的级数
     */
    @TableField("recommend_level")
    private Integer recommendLevel;

    /**
     * 中间级别
     */
    @TableField(exist = false)
    private Integer parentLevel;

    @Override
    public String toString() {
        return "UserProperty{" +
        "userId=" + userId +
        ", parentId=" + parentId +
        ", parentGradeId=" + parentGradeId +
        ", relationPath=" + relationPath +
        ", gradeId=" + gradeId +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", deleteFlag=" + deleteFlag +
        "}";
    }
}
